/**
 * @file test_inet_pton.c
 * @author your name (you@domain.com)
 * @brief inet_pton()使用示例
 * @version 0.1
 * @date 2023-07-03
 * 
 * @copyright Copyright (c) 2023
 * 
 */
#include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>

#define IPV4_ADDR "192.168.1.222"

int main(int argc, char const *argv[])
{
    struct in_addr addr;
    inet_pton(AF_INET, IPV4_ADDR, &addr);
    printf("ip addr: 0x%x\n", addr.s_addr);
    exit(0);
}
